---
image: /generated/articles-docs-media-parser-universal-reader.png
id: universal-reader
title: universalReader
slug: /media-parser/universal-reader
crumb: '@remotion/media-parser'
---

:::warning
[We are phasing out Media Parser and are moving to Mediabunny](/blog/mediabunny)!
:::

A [reader](/docs/media-parser/readers) for [`@remotion/media-parser`](/docs/media-parser) that reads either from a URL, from a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) or from a local file path.

It is the combination of [`nodeReader`](/docs/media-parser/node-reader) and [`webReader`](/docs/media-parser/web-reader).

Because of the dependency on the `fs` module, it cannot be used in the browser.

## Example

```tsx twoslash title="Reading from any source"
import {parseMedia} from '@remotion/media-parser';
import {universalReader} from '@remotion/media-parser/universal';

const result = await parseMedia({
  // Or a File, or a URL
  src: '/Users/jonnyburger/Downloads/my-video.mp4',
  fields: {
    durationInSeconds: true,
    dimensions: true,
  },
  reader: universalReader,
});
```

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/media-parser/src/universal.ts)
- [`parseMedia()`](/docs/media-parser/parse-media)
